<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<link rel="stylesheet" type="text/css" href="<s:url value='/CSS/head.css'/>"/>
<div class="top">
  <span><s:a action="cartAction_list" namespace="/cart">My Cart</s:a></span>|
  <span><s:a action="orderAction_getOrdersByUser" namespace="/order">My Order</s:a></span>
  <s:if test="#session.user != null">
    <span>Welcome, <b><s:property value="#session.user.userName"/></b></span>|
    <span><s:a action="userAction_logout" namespace="/user">Exit</s:a></span>
    <s:if test="#session.user.permission == 1">
      &nbsp;<span><s:a action="backAction_manager" namespace="/back">System Management</s:a></span> 
    </s:if>
  </s:if>
  <s:else>
   <span><s:a action="userAction_toLogin" namespace="/user">Login</s:a></span>|
   <span><s:a action="userAction_toRegister" namespace="/user">Register</s:a></span>
  </s:else> 
</div>
<div class="search">
  <s:form action="productAction_queryProductsByName" namespace="/product">
    <span class="logo">Shopping Mall</span>
    <input class="head-text" type="text" name="product.name" placeholder="input fuzzy product name"/>
    <input class="head-submit" type="submit" value="Search"/>
  </s:form>
</div>
<div class="menu">
  <div class="menu-item">
    <s:a action="index" namespace="/">Home</s:a>
  </div>
  <div class="menu-item">
    <s:a action="productAction_queryProductsByCreatedTime" namespace="/product">New Listing Products</s:a>
  </div>
  <div class="menu-item">
    <s:a action="productAction_queryProductsBySalesVolume" namespace="/product">Selling Well Products</s:a>
  </div>
  <div class="menu-item">
    <s:a action="productAction_queryProductsByIsRecommended" namespace="/product">Recommending Products</s:a>
  </div>
  <div class="menu-item">
    <s:a action="productAction_queryProductsByClicks" namespace="/product">Popular Products</s:a>
  </div>
</div>
